<template>
    <router-view/>
</template>

<script lang="ts" setup>
import router from "@/router";

// router.beforeEach((to, from, next) => {

//   let arr = ['/main/study' , '/main/share' , '/main/personal' , '/main/settings' , '/main/wordList']

//   if (arr.includes(to.path)) {
//     if (sessionStorage.getItem("user") != null) {
//       next();
//     } else {
//       router.push(from);
//       Dialog("请先登录");
//     }
//   } else {
//     next();
//   }
// })

router.beforeEach((to, from, next) => {
  if (to.path === '/') {
    router.push('/main/study')
  }
  next();
})

</script>

<style>
*{
  margin: 0;
  padding: 0;
}
body,html{
  width: 100%;
  height: 100%;
}
#app{
  width: 100%;
  height: 100%;
}
.var-loading__content{
  width: 100%;
  height: 100%;
}
.var-uploader__file-list{
  justify-content: center;
}
</style>
